package nianbao;

import io.netty.util.CharsetUtil;

/**
 * 自定义消息协议
 */
public class MessageProtocal {

    private int length;

    private String message;

    public MessageProtocal(String message) {
        this.message = message;
        this.length = message.getBytes(CharsetUtil.UTF_8).length;
    }

    public int getLength() {
        return length;
    }

    public String getMessage() {
        return message;
    }
}
